﻿@model IEnumerable<KRM.Core.vKRWNewSiteSubmission>

@foreach (var item in Model)
{
    <fieldset>
        <legend>@item.dateposted</legend>
        <div class="row-fluid">
            <div class="span5">@item.StoreName
                <textarea class="input-block-level" rows="5" disabled="disabled">@item.Question</textarea>
            </div>
            <div class="span3">
                Answer
                <textarea class="input-block-level" rows="5" disabled="disabled">@item.answer</textarea>
            </div>
            <div class="span4">
                <div class="row-fluid">
                    <div class="span4">Assigned to</div>
                    <div class="span8">
                        <input type="text" disabled="disabled" class="input-block-level" 
                              value="@(string.IsNullOrEmpty(item.assignedTo) ? "NOT assigned" : item.assignedTo)"/>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2"></div>
                    <div class="span8">@item.custname</div>
                </div>
                <div class="row-fluid">
                    <div class="span4">Tel</div>
                    <div class="span8">
                        <input type="text" disabled="disabled" class="input-block-level" value="@item.telephone"/>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2"></div>
                    <div class="span8">@item.email</div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span8">
                <a href="@item.ProductURL" target="_blank">@item.ProductName</a>
            </div>
            <div class="span4 text-right">
                <input type="button" class="btn btn-primary" value="Show" onclick="PopupCenter('/task/sitesubmission?questionid=@item.SiteQuestionID', 700, 650)" />
            </div>
        </div>
    </fieldset>
}